package com.dbh.design.strategy;

import com.dbh.design.strategy.entity.Quack;
import com.dbh.design.strategy.entity.Squeak;

/**
 *
 * 主方法
 * @author dongbanghui
 * @date 2021/3/26
 */
public class Client {

    public static void main(String[] args) {
        Duck duck = new Duck();
        duck.setQuackBehavior(new Squeak());
        duck.preformQuack();
        duck.setQuackBehavior(new Quack());
        duck.preformQuack();
    }
}
